<!doctype html>
<html lang="en">

<head>
<meta charset="utf-8">
<title>单位人员信息</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../../../layui/css/layui.css"  media="all">
<script src="../../../layui/layui.js" charset="utf-8"></script>
<script src="../../../js/angular.js" charset="utf-8"></script>
<script src="../../../layui/jquery-3.2.1.min.js" charset="utf-8"></script>
<script type="text/javascript" src="../gjjhbj/fy.js"></script>

<body>
	<br>
	<div ng-app="myApp" ng-controller="customersCtrl" align="center">
		姓名：<input type="text" ng-model="XM" style="width: 15%">
		证件号码：<input type="text" ng-model="SFZH" style="width: 15%">
		缴存状态：
		<select style="width: 15%" ng-model="JCZT">
			<option value="">全部</option>
			<option value="缴存">缴存</option>
			<option value="停缴">停缴</option>
			<option value="销户">销户</option>
		</select>
		<input type="button" ng-click="cx()" style="width: 10%" value="查&nbsp;询">
	<div><loading>查询中请稍后</loading>  
		<table class="layui-table" style="width:90%">
			<tr align="center" style="background-color:#f1f1f1">
				<td>姓名</td>
				<td>个人账号</td>
				<td>单位账号</td>
				<td>证件号码</td>
				<td>缴存情况</td>
				<td>手机号码</td>
				<td>月应缴额</td>

			</tr>
			<tr ng-repeat="x in names" align="center">

				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.XINGMING }}</td>
				<td ng-if="$even">{{ x.XINGMING }}</td>
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.GRZH }}</td>
				<td ng-if="$even">{{ x.GRZH }}</td>
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.DWZH
					}}</td>
				<td ng-if="$even">{{ x.DWZH }}</td>
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.ZJHM
					}}</td>
				<td ng-if="$even">{{ x.ZJHM }}</td>
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.JCQK
					}}</td>
				<td ng-if="$even">{{ x.JCQK }}</td>
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.SJHM }}</td>
				<td ng-if="$even">{{ x.SJHM }}</td>
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.YYJE }}</td>
				<td ng-if="$even">{{ x.YYJE }}</td>
			</tr>
		</table>
		<div class="layui-btn-group">
			<button class="layui-btn layui-btn-primary layui-btn-sm"
				ng-click="Sy()">首页</button>
			<button class="layui-btn layui-btn-primary layui-btn-sm"
				ng-click="Previous()">上一页</button>
			<button ng-repeat="page in pageList" class="layui-btn layui-btn-primary layui-btn-sm "
				ng-click="selectPage(page)" >{{page}}</button>
			<button class="layui-btn layui-btn-primary layui-btn-sm"
				ng-click="Next()">下一页</button>
			<button class="layui-btn layui-btn-primary layui-btn-sm"
				ng-click="Wy()">尾页</button>
			<button class="layui-btn layui-btn-primary layui-btn-sm "
				>{{selPage}}/{{pages}}</button>
		</div>
	</div>
</div>
	<script>
		layui.use('element', function() {
			var $ = layui.jquery, element = layui.element;
		});
	</script>
	<script type="text/javascript">
	function getPath() {  
	    return 'http://'+location.host;
	}
	</script>
<script type="text/javascript" src="../../../layui/lay/modules/layer.js"></script>
<script type="text/javascript" src="../../../layui/layer.ext.js"></script>
<script type="text/javascript">
		var a;
		var app = angular.module('myApp', []);
		 app.directive('loading', function(){  
		        return {  
		            restrict: 'E',  
		            transclude: true,  
		            template: '<div ng-show="loading" class="loading" id="allDiv"  style="position:fixed; top:0px; left:0px; width:100%; height:100%; display:none; background-color:#000; opacity: 0.5; z-index:99999;">'  
		            +'<img alt="" src="../../../layui/img/jz.gif" style="vertical-align: middle;width:30px; height:30px; position: absolute; top:50%; left:50%; margin-top: -50px; margin-left:-50px;"/>'
		            +'</div>',  
		            link: function (scope, element, attr) {  
		                scope.$watch('loading', function (val) {  
		                    if (val){  
		                        document.getElementById("allDiv").style.display = "block";  
		                    }else{  
		                        document.getElementById("allDiv").style.display = 'none';  
		  
		                    }  
		                });  
		            }  
		        };
		    });  
		    app.controller('customersCtrl', function($scope, $http) {
		    $scope.setLoading =function(){  
			    if($scope.loading ==undefined || $scope.loading ==false){  
			        $scope.loading=true;  
			    }else{  
			        $scope.loading=false;  
			    };
			};
			a();
				  $scope.cx = a;
	function a() {
		  		$scope.setLoading();
				$scope.params={SFZH:$scope.SFZH,XM:$scope.XM,JCZT:$scope.JCZT};
				
			$http({
				url:getPath() + "/wsyyt/dwryxxcontroller/test",
				contentType:"text/html;charset=utf-8",
				method:'post',
				params:$scope.params,	
			})
					.then(
							function(res) {
								$scope.data = res.data.data;//自己打断点看格式:[{},{}]
								$scope.setLoading();
								if(res.data.code==1){
									$scope.names="";
									$scope.selPage="";
									$scope.selectPage="";
									$scope.pages="";
									$scope.page="";
									$scope.pageList="";
									layer.msg('提示：'+res.data.CW,{icon: 5});		
									return null;						
								}
								a = res.data.CNT;
								feny($scope.data);
      	  //查询页
	      $scope.ok = function () {
	        if($scope.ty != "" && $scope.ty!=null){
	      		 $scope.selectPage($scope.ty);
	     	 }else{
	      		return;
	     	 	}
	      	};
    	});
	};
	
});
	</script>		
</body>
</html>